﻿Imports System.Windows.Forms

Public Class Thresholds

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        My.Settings.CPUThreshold = CPUThreasholdTB.Text
        My.Settings.DTThreshold = DTThresholdTB.Text
        My.Settings.DRThreshold = DRThresholdTB.Text
        My.Settings.DWThreshold = DWThresholdTB.Text
        My.Settings.Save()
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub Thresholds_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        CPUThreasholdTB.Text = My.Settings.CPUThreshold
        DTThresholdTB.Text = My.Settings.DTThreshold
        DRThresholdTB.Text = My.Settings.DRThreshold
        DWThresholdTB.Text = My.Settings.DWThreshold
    End Sub
End Class
